package stdlib.nio

import java.io.File
import java.nio.file.Files
import java.nio.file.Paths
import java.nio.file.attribute.BasicFileAttributes


fun testBasicFileAttributes() {
    val path = Paths.get("build.gradle.kts")
    val attributes = Files.readAttributes(path, BasicFileAttributes::class.java)
    println(attributes.creationTime())
    println(attributes.lastAccessTime())
    println(attributes.size())
    println(attributes.isRegularFile)
    println(attributes.isDirectory)
    println(path.toAbsolutePath())

    val file = File("text.txt")
    println(file.isFile)
}

fun main() {
    testBasicFileAttributes()
}